{% extends "base_mobile.html" %}

{% block title %}
CMAT 21 - Rings
{% endblock title %}

{% block heading %}
Rings
{% endblock heading %}

{% block ring_li %}class="ui-btn-active"{% endblock %}

{% block content %}
<ul data-role="listview">
{% for ring, meta_data in rings %}
  {% if ring.number == 0 %}
  {% else %}
  <li><a href="/ring/{{ring.number}}">
    <h3>Ring {{ring.number}}</h3>
    <p class="ui-li-count">{{meta_data.num_unfinished_events}}</p>
    {% if meta_data.next_event %}
    <p>Current event - {{meta_data.next_event.shortcode}}</p>
    {% else %}
    <p>Current event - None</p>
    {% endif %}
  </a></li>
  {% endif %}
{% endfor %}
</ul>
{% endblock content %}
